﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using DataAccess.BusinessEntities;
using Locator.GeoLocation.BusinessEntities;

namespace Locator.Services
{
    [ServiceContract]
    public interface IPersonalLocationsService
    {
        /// <summary>
        /// Gets the personal locations for the current user.
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        [ApplyDataContractResolver]
        List<PersonalLocation> GetPersonalLocationsForCurrentUser();

        /// <summary>
        /// Gets a personal location for the current user.
        /// </summary>
        /// <param name="ID">The ID.</param>
        /// <returns></returns>
        [OperationContract]
        [ApplyDataContractResolver]
        PersonalLocation GetPersonalLocationForCurrentUser(int ID);

        /// <summary>
        /// Adds a personal location for current user.
        /// </summary>
        /// <param name="description">The description.</param>
        /// <param name="latitude">The latitude.</param>
        /// <param name="longitude">The longitude.</param>
        [OperationContract]
        [ApplyDataContractResolver]
        void AddPersonalLocationForCurrentUser(string description, double latitude, double longitude);

        /// <summary>
        /// Deletes a personal location for current user.
        /// </summary>
        /// <param name="personalLocationId">The personal location id.</param>
        [OperationContract]
        [ApplyDataContractResolver]
        void DeletePersonalLocationForCurrentUser(int personalLocationId);

        [OperationContract]
        Location SearchByPostalCode(string postalCode, string country);

        [OperationContract]
        Location SearchByAddress(string streetAddress, string country, string province, string city);
    }
}
